import java.util.Random;
import java.util.Scanner;

/**
 * @author 陈艺菲
 * @date 2025/2/22 9:38
 * @description [这里简要描述类的功能]
 * 2025居比绝对上岸！
 */
public class JavaSE3 {
    public static void main(String[] args) {
        //猜数字游戏
        int n=0;
        Random random=new Random();
        n= random.nextInt(100)+1;//1~101的数字
        Scanner scanner=new Scanner(System.in);

        while (true){
            System.out.println("请输入你要猜的数字：");
            int a=scanner.nextInt();
            if(a<56){
                System.out.println("猜小了");
            } else if (a>56) {
                System.out.println("猜大了");

            }else {
                System.out.println("猜对了，这个数字就是：" + 56);
                break;
            }


        }
        scanner.close();

    }
    public static void main1(String[] args) {
        //求5！+4！+3!+2!+1! 阶乘的和
        int sum = 0;
        for (int n = 1; n <= 5; n++) {
            int ret = 1;
            for (int i = 1; i <= n; i++) {
                ret*=i;

            }
            sum+=ret;

        }
        System.out.println(sum);
    }
}
